import java.util.LinkedList;
import java.util.TreeMap;


public class AnimationManager implements Runnable {
	private LinkedList<MovableTransport> MTQueue = new LinkedList<MovableTransport>();
	
	private TreeMap<String, Road> roads;
	private TreeMap<String, Rail> rails;
	private MapPanel panel;
	
	public AnimationManager(TreeMap<String, Road> roads, TreeMap<String, Rail> rails, MapPanel panel) {
		this.roads = roads;
		this.rails = rails;
		this.panel = panel;
	}
	
	public void addVehicle() {
		if (roads == null)
			return;
		
		MovableTransport addMT = new MovableTransport(roads);
		MTQueue.add(addMT);
	}
	
	public void removeVehicle() {
		if (MTQueue.isEmpty())
			return;
		
		MTQueue.remove().setInactive();
	}

	
	public void run() {
		// TODO Auto-generated method stub
		//while ()
		//for (MovableTransport move : MTQueue)
	}
}
